<?php
/**
 * Class descript.
 * User: chan
 * Date: 2017/10/20 11:22
 */
namespace app\api\validate;
class Personal extends BaseValidate
{
   	public function checkSuggestionParam()
    {
    	$this->rule = [
            'content' => 'require|isNotEmpty',
        ];

        $this->message = [
            'content.require' => 'content参数为空',
        ];

        $this->checkParam();
    }

    public function checkMemberInfoParam()
    {
        $this->rule = [
            'uid' => 'require|isNotEmpty',
            'user_id' => 'require|isNotEmpty',
        ];

        $this->message = [
            'uid.require' => 'uid参数为空',
            'user_id.require' => 'user_id参数为空',
        ];

        $this->checkParam();
    }

    public function checkSendLetterParam()
    {
        $this->rule = [
            'title' => 'require|isNotEmpty',
            'content' => 'require|isNotEmpty',
            'uid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'title.require' => '标题不能为空',
            'content.require' => '私信内容不能为空',
            'uid.require' => '发送对象uid不能为空',
        ];

        $this->checkParam();
    }

    public function checkLetterInfoParam()
    {
        $this->rule = [
            'pid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'pid.require' => 'pid参数为空',
        ];

        $this->checkParam();
    }

    public function checkArticleInfoParam()
    {
        $this->rule = [
            'kid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'kid.require' => 'kid参数为空',
        ];

        $this->checkParam();
    }

    public function checkSystemInfoParam()
    {
        $this->rule = [
            'sid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'sid.require' => 'sid参数为空',
        ];

        $this->checkParam();
    }

    public function checkGetCouponParam()
    {
        $this->rule = [
            'vid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'vid.require' => 'vid参数为空',
        ];

        $this->checkParam();
    }

    public function checkDynamicInfoParam()
    {
        $this->rule = [
            'cid' => 'require|isNotEmpty',
        ];

        $this->message = [
            'cid.require' => 'cid参数为空',
        ];

        $this->checkParam();
    }
}